3.68 \(\int \frac{(a+b x)^2 (A+B x)}{x^4} \, dx\)

Optimal. Leaf size=49 \[ -\frac{a^2 A}{3 x^3}-\frac{a (a B+2 A b)}{2 x^2}-\frac{b (2 a B+A b)}{x}+b^2 B \log (x) \]

[Out]

-(a^2*A)/(3*x^3) - (a*(2*A*b + a*B))/(2*x^2) - (b*(A*b + 2*a*B))/x + b^2*B*Log[x
]

_______________________________________________________________________________________

Rubi [A]  time = 0.0606733, antiderivative size = 49, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062 \[ -\frac{a^2 A}{3 x^3}-\frac{a (a B+2 A b)}{2 x^2}-\frac{b (2 a B+A b)}{x}+b^2 B \log (x) \]

Antiderivative was successfully verified.

[In]  Int[((a + b*x)^2*(A + B*x))/x^4,x]

[Out]

-(a^2*A)/(3*x^3) - (a*(2*A*b + a*B))/(2*x^2) - (b*(A*b + 2*a*B))/x + b^2*B*Log[x
]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 15.4601, size = 44, normalized size = 0.9 \[ - \frac{A a^{2}}{3 x^{3}} + B b^{2} \log{\left (x \right )} - \frac{a \left (2 A b + B a\right )}{2 x^{2}} - \frac{b \left (A b + 2 B a\right )}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)**2*(B*x+A)/x**4,x)

[Out]

-A*a**2/(3*x**3) + B*b**2*log(x) - a*(2*A*b + B*a)/(2*x**2) - b*(A*b + 2*B*a)/x

_______________________________________________________________________________________

Mathematica [A]  time = 0.0414151, size = 48, normalized size = 0.98 \[ b^2 B \log (x)-\frac{a^2 (2 A+3 B x)+6 a b x (A+2 B x)+6 A b^2 x^2}{6 x^3} \]

Antiderivative was successfully verified.

[In]  Integrate[((a + b*x)^2*(A + B*x))/x^4,x]

[Out]

-(6*A*b^2*x^2 + 6*a*b*x*(A + 2*B*x) + a^2*(2*A + 3*B*x))/(6*x^3) + b^2*B*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 52, normalized size = 1.1 \[{b}^{2}B\ln \left ( x \right ) -{\frac{abA}{{x}^{2}}}-{\frac{{a}^{2}B}{2\,{x}^{2}}}-{\frac{{b}^{2}A}{x}}-2\,{\frac{abB}{x}}-{\frac{A{a}^{2}}{3\,{x}^{3}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)^2*(B*x+A)/x^4,x)

[Out]

b^2*B*ln(x)-a/x^2*A*b-1/2*a^2/x^2*B-b^2/x*A-2*b/x*B*a-1/3*a^2*A/x^3

_______________________________________________________________________________________

Maxima [A]  time = 1.33932, size = 68, normalized size = 1.39 \[ B b^{2} \log \left (x\right ) - \frac{2 \, A a^{2} + 6 \,{\left (2 \, B a b + A b^{2}\right )} x^{2} + 3 \,{\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(b*x + a)^2/x^4,x, algorithm="maxima")

[Out]

B*b^2*log(x) - 1/6*(2*A*a^2 + 6*(2*B*a*b + A*b^2)*x^2 + 3*(B*a^2 + 2*A*a*b)*x)/x
^3

_______________________________________________________________________________________

Fricas [A]  time = 0.204527, size = 72, normalized size = 1.47 \[ \frac{6 \, B b^{2} x^{3} \log \left (x\right ) - 2 \, A a^{2} - 6 \,{\left (2 \, B a b + A b^{2}\right )} x^{2} - 3 \,{\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(b*x + a)^2/x^4,x, algorithm="fricas")

[Out]

1/6*(6*B*b^2*x^3*log(x) - 2*A*a^2 - 6*(2*B*a*b + A*b^2)*x^2 - 3*(B*a^2 + 2*A*a*b
)*x)/x^3

_______________________________________________________________________________________

Sympy [A]  time = 2.77017, size = 51, normalized size = 1.04 \[ B b^{2} \log{\left (x \right )} - \frac{2 A a^{2} + x^{2} \left (6 A b^{2} + 12 B a b\right ) + x \left (6 A a b + 3 B a^{2}\right )}{6 x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)**2*(B*x+A)/x**4,x)

[Out]

B*b**2*log(x) - (2*A*a**2 + x**2*(6*A*b**2 + 12*B*a*b) + x*(6*A*a*b + 3*B*a**2))
/(6*x**3)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.287234, size = 69, normalized size = 1.41 \[ B b^{2}{\rm ln}\left ({\left | x \right |}\right ) - \frac{2 \, A a^{2} + 6 \,{\left (2 \, B a b + A b^{2}\right )} x^{2} + 3 \,{\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(b*x + a)^2/x^4,x, algorithm="giac")

[Out]

B*b^2*ln(abs(x)) - 1/6*(2*A*a^2 + 6*(2*B*a*b + A*b^2)*x^2 + 3*(B*a^2 + 2*A*a*b)*
x)/x^3